﻿<UserControl x:Class="XamlPhysics.Samples.Polygons"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:physics="clr-namespace:XamlPhysics;assembly=XamlPhysics"
    mc:Ignorable="d"
    d:DesignHeight="768" d:DesignWidth="1024">

    <Canvas>
        <Polygon Points="0,12, 20,0, 40,10, 18,60" Fill="DarkRed" Canvas.Left="600" Canvas.Top="110" Width="40" Height="80">
            <physics:PhysicalBox.Body>
                <physics:PolygonBody>
                </physics:PolygonBody>
            </physics:PhysicalBox.Body>
        </Polygon>
        <Polygon Points="0,12, 20,0, 40,10, 18,60" Fill="DarkGreen" Canvas.Left="341" Canvas.Top="199" Width="40" Height="80">
            <physics:PhysicalBox.Body>
                <physics:PolygonBody />
            </physics:PhysicalBox.Body>
        </Polygon>
        <Polygon Points="0,10, 10,0, 40,10, 31,50" Fill="DarkGoldenrod" Canvas.Left="476" Canvas.Top="48" Width="40" Height="50">
            <physics:PhysicalBox.Body>
                <physics:PolygonBody />
            </physics:PhysicalBox.Body>
        </Polygon>
        <Polygon Points="0,0 0,164 10,164 12,148 15,133 21,115 27,101 33,90 41,78 48,69 58,58 69,48 78,41 90,33 101,27 115,21 133,15 148,12 164,10 164,0" Fill="DarkBlue" Canvas.Left="206" Canvas.Top="70" Width="160" Height="160">
            <physics:PhysicalBox.Body>
                <physics:PolygonBody />
            </physics:PhysicalBox.Body>
        </Polygon>

        <Rectangle Canvas.Left="-100" Canvas.Top="768" Width="1240" Height="10" Fill="Black">
            <physics:PhysicalBox.Body>
                <physics:RectangleBody IsStatic="True" />
            </physics:PhysicalBox.Body>
        </Rectangle>
    </Canvas>
</UserControl>